<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="..\Shared.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!--Style x:Key="{x:Type Menu}" TargetType="{x:Type Menu}">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Menu}">
                    <Border CornerRadius="1" BorderThickness="1" Background="{DynamicResource VOColor02}" Opacity="0.8" >
                        <StackPanel ClipToBounds="True" Orientation="Horizontal" IsItemsHost="True"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style-->

    <!-- ContextMenu -->
    <Style TargetType="{x:Type ContextMenu}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Grid.IsSharedSizeScope" Value="true"/>
        <Setter Property="HasDropShadow" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ContextMenu}">
                    <Grid>
                        <Border
					  Name="Border"
					  Background="{DynamicResource VOColor13}"
					  BorderBrush="{DynamicResource VOColor02}"
					  BorderThickness="1"
                      Opacity="0.9"/>
                        <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- MenuItem.Separator -->
    <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}">
        <Setter Property="Height" Value="1"/>
        <Setter Property="Margin" Value="1,1,1,1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Separator}">
                    <Border BorderBrush="{DynamicResource VOColor02}" BorderThickness="1" Opacity="0.8"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- MenuItem.TopLevelHeader -->
    <ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
        <Border Name="Border" CornerRadius="0">
            <Grid>
                <ContentPresenter
				  Margin="6,6,6,3"
				  ContentSource="Header"
				  RecognizesAccessKey="True" />
                <Popup
				  Name="Popup"
				  Placement="Bottom"
				  IsOpen="{TemplateBinding IsSubmenuOpen}"
				  AllowsTransparency="True"
				  Focusable="False"
				  PopupAnimation="Fade">
                    <Grid>
                        <Border
					  CornerRadius="0"
					  Name="SubmenuBorder"
					  SnapsToDevicePixels="True"
					  Background="Transparent"
					  BorderBrush="Transparent"
					  BorderThickness="1"
                      Opacity="0.8"/>
                        <StackPanel
						  IsItemsHost="True"
						  KeyboardNavigation.DirectionalNavigation="Cycle" />
                    </Grid>
                </Popup>
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="IsSuspendingPopupAnimation" Value="true">
                <Setter TargetName="Popup" Property="PopupAnimation" Value="None"/>
            </Trigger>
            <Trigger Property="IsHighlighted" Value="true">
                <Setter TargetName="Border" Property="Background" Value="{DynamicResource VOColor02}"/>
                <Setter TargetName="Border" Property="BorderBrush" Value="Transparent"/>
            </Trigger>
            <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
                <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0"/>
                <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,0,0,3"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
                <Setter Property="Foreground" Value="White"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!-- MenuItem.TopLevelItem -->
    <ControlTemplate
        x:Key="{x:Static MenuItem.TopLevelItemTemplateKey}"
        TargetType="{x:Type MenuItem}">
        <Grid>
            <Border Name="Border" CornerRadius="0" Margin="1" BorderThickness="1" Opacity="0.8"/>
            <ContentPresenter
				  Margin="6,3,6,3"
				  ContentSource="Header"
				  RecognizesAccessKey="True" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="IsHighlighted" Value="true">
                <Setter TargetName="Border" Property="Background" Value="{DynamicResource VOColor02}"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!-- MenuItem.SubmenuItem -->
    <ControlTemplate
	  x:Key="{x:Static MenuItem.SubmenuItemTemplateKey}"
	  TargetType="{x:Type MenuItem}">
        <Grid>
            <Border Name="Border" CornerRadius="0" BorderThickness="1" Opacity="0.8"/>

            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="Icon"/>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut"/>
                    <ColumnDefinition Width="13"/>
                </Grid.ColumnDefinitions>
                <ContentPresenter
				  Name="Icon"
				  Margin="6,0,6,0"
				  VerticalAlignment="Center"
				  ContentSource="Icon"/>
                <Border
				  Name="Check"
				  Width="13" Height="13"
				  Visibility="Collapsed"
				  Margin="6,0,6,0"
				  CornerRadius="1"
				  Background="Transparent"
				  BorderThickness="1"
				  BorderBrush="Transparent">
                    <Path
					  Name="CheckMark"
					  Width="7" Height="7"
					  Visibility="Hidden"
					  SnapsToDevicePixels="False"
					  Stroke="{DynamicResource VOColor02}"
					  StrokeThickness="2"
                      Opacity="0.7"
					  Data="M 0 0 L 7 7 M 0 7 L 7 0" />
                </Border>
                <ContentPresenter
				  Name="HeaderHost"
				  Grid.Column="1"
				  ContentSource="Header"
				  Margin="0,3,0,3"
				  RecognizesAccessKey="True"/>
                <TextBlock x:Name="InputGestureText"
				  Grid.Column="2"
				  Text="{TemplateBinding InputGestureText}"
				  Margin="5,2,0,2"
				  DockPanel.Dock="Right" />
            </Grid>
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="Icon" Value="{x:Null}">
                <Setter TargetName="Icon" Property="Visibility" Value="Hidden"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="true">
                <Setter TargetName="CheckMark" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsCheckable" Value="true">
                <Setter TargetName="Check" Property="Visibility" Value="Visible"/>
                <Setter TargetName="Icon" Property="Visibility" Value="Hidden"/>
            </Trigger>
            <Trigger Property="IsHighlighted" Value="true">
                <Setter TargetName="Border" Property="Background" Value="{DynamicResource VOColor02}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="White"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!-- MenuItem.SubmenuHeader -->
    <!--ControlTemplate
	  x:Key="{x:Static MenuItem.SubmenuHeaderTemplateKey}"
	  TargetType="{x:Type MenuItem}">
        <Border Name="Border" CornerRadius="0" BorderThickness="1">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" SharedSizeGroup="Icon"/>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut"/>
                    <ColumnDefinition Width="13"/>
                </Grid.ColumnDefinitions>
                <ContentPresenter
				  Name="Icon"
				  Margin="6,0,6,0"
				  VerticalAlignment="Center"
				  ContentSource="Icon"/>
                <ContentPresenter
				  Name="HeaderHost"
				  Grid.Column="1"
				  ContentSource="Header"
				  Margin="0,3,0,3"
				  RecognizesAccessKey="True"/>
                <TextBlock x:Name="InputGestureText"
				  Grid.Column="2"
				  Text="{TemplateBinding InputGestureText}"
				  Margin="5,2,2,2"
				  DockPanel.Dock="Right"/>
                <Path
				  Grid.Column="3"
				  HorizontalAlignment="Center"
				  VerticalAlignment="Center"
				  Data="M 0 0 L 0 7 L 4 3.5 Z"
                  Opacity="0.7"
				  Fill="{DynamicResource VOColor02}" />
                <Popup
				  Name="Popup"
				  Placement="Right"
				  HorizontalOffset="-4"
				  IsOpen="{TemplateBinding IsSubmenuOpen}"
				  AllowsTransparency="True"
				  Focusable="False"
				  PopupAnimation="Fade">
                    <Grid>
                        <Border
					  CornerRadius="0"
					  Name="SubmenuBorder"
					  SnapsToDevicePixels="True"
					  Background="{StaticResource FlatWindowBackground}"
					  BorderBrush="{DynamicResource VOColor02}"
                      Opacity="0.7"
					  BorderThickness="1" />
                        <StackPanel
						  IsItemsHost="True"
						  KeyboardNavigation.DirectionalNavigation="Cycle" />
                    </Grid>
                </Popup>
            </Grid>
        </Border>
        <ControlTemplate.Triggers>
            <Trigger Property="Icon" Value="{x:Null}">
                <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsHighlighted" Value="true">
                <Setter TargetName="Border" Property="Background" Value="{DynamicResource VOColor02}"/>
            </Trigger>
            <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
                <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0"/>
                <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,3,0,3"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate-->

    <!--Style x:Key="{x:Type MenuItem}" TargetType="{x:Type MenuItem}">
        <Setter Property="FontFamily" Value="Tahoma" />
        <Setter Property="FontSize" Value="9" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Style.Triggers>
            <Trigger Property="Role" Value="TopLevelHeader">
                <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelHeaderTemplateKey}}"/>
                <Setter Property="Grid.IsSharedSizeScope" Value="true"/>
            </Trigger>
            <Trigger Property="Role" Value="TopLevelItem">
                <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelItemTemplateKey}}"/>
            </Trigger>
            <Trigger Property="Role" Value="SubmenuHeader">
                <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuHeaderTemplateKey}}"/>
            </Trigger>
            <Trigger Property="Role" Value="SubmenuItem">
                <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuItemTemplateKey}}"/>
            </Trigger>
            <Trigger Property="IsHighlighted" Value="True">
                <Setter Property="Foreground" Value="White" />
            </Trigger>
        </Style.Triggers>
    </Style-->

</ResourceDictionary>